package nl.vu.few.ibivu.biomodels.client;

import java.util.ArrayList;
import java.util.Collection;
import java.util.Iterator;

public class GwtRpcResultList<E> extends ArrayList<E> {	
	/**
	 * 
	 */
	private static final long serialVersionUID = 7654112496505729548L;
	String nextCursor;
	Integer totalRows;
	
	
	public GwtRpcResultList() {
		super();
		totalRows = null;
	}
	
	public GwtRpcResultList(Collection<? extends E> c) {
		super(c);
		totalRows = null;
	}

	public GwtRpcResultList(Iterator<? extends E> elements) {
		this();
		while (elements.hasNext()) {
			add(elements.next());
		}
	}

	public String getNextCursor() {
		return nextCursor;
	}

	public void setNextCursor(String nextCursor) {
		this.nextCursor = nextCursor;
	}

	public Integer getTotalRows() {
		return totalRows;
	}

	public void setTotalRows(Integer totalRows) {
		this.totalRows = totalRows;
	}
}
